<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>class RubyXL::Workbook - rubyXL 3.4.35</title>


  <meta name="keywords" content="ruby,class,RubyXL::Workbook">


    <meta name="description" content="class RubyXL::Workbook: www. datypic.">





<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
</script>

<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<link href="../css/fonts.css" rel="stylesheet">
<link href="../css/rdoc.css" rel="stylesheet">



<body id="top" role="document" class="class">
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
  <span aria-hidden="true">&#9776;</span>
</div>


<nav id="navigation" role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="../index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  

  

  
<div id="parent-class-section" class="nav-section">
  <h3>Ancestors</h3>
  <ul><li><a href="OOXMLTopLevelObject.html">RubyXL::OOXMLTopLevelObject</a><ul><li><a href="OOXMLObject.html">RubyXL::OOXMLObject</a><ul><li>Object</li></ul></li></ul></li></ul>
</div>


  
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">


    <li><a class="include" href="RelationshipSupport.html">RubyXL::RelationshipSupport</a></li>



    <li><span class="include">Enumerable</span></li>


  </ul>
</div>


  

  
  <div class="nav-section">
    <h3>Class Methods</h3>
    <ul class="link-list" role="directory">

      <li class="calls-super" ><a href="#method-c-new">new</a></li>

    </ul>
  </div>



  <div class="nav-section">
    <h3>Instance Methods</h3>
    <ul class="link-list" role="directory">

      <li ><a href="#method-i-5B-5D">[]</a></li>

      <li ><a href="#method-i-add_worksheet">add_worksheet</a></li>

      <li ><a href="#method-i-application">application</a></li>

      <li ><a href="#method-i-application-3D">application=</a></li>

      <li ><a href="#method-i-appversion">appversion</a></li>

      <li ><a href="#method-i-appversion-3D">appversion=</a></li>

      <li ><a href="#method-i-before_write_xml">before_write_xml</a></li>

      <li ><a href="#method-i-company">company</a></li>

      <li ><a href="#method-i-company-3D">company=</a></li>

      <li ><a href="#method-i-content_type">content_type</a></li>

      <li ><a href="#method-i-created_at">created_at</a></li>

      <li ><a href="#method-i-created_at-3D">created_at=</a></li>

      <li ><a href="#method-i-creator">creator</a></li>

      <li ><a href="#method-i-creator-3D">creator=</a></li>

      <li ><a href="#method-i-date1904">date1904</a></li>

      <li ><a href="#method-i-date1904-3D">date1904=</a></li>

      <li ><a href="#method-i-date_to_num">date_to_num</a></li>

      <li ><a href="#method-i-modified_at">modified_at</a></li>

      <li ><a href="#method-i-modified_at-3D">modified_at=</a></li>

      <li ><a href="#method-i-modifier">modifier</a></li>

      <li ><a href="#method-i-modifier-3D">modifier=</a></li>

      <li ><a href="#method-i-num_to_date">num_to_date</a></li>

      <li ><a href="#method-i-related_objects">related_objects</a></li>

      <li ><a href="#method-i-save">save</a></li>

      <li ><a href="#method-i-stream">stream</a></li>

      <li ><a href="#method-i-write">write</a></li>

      <li ><a href="#method-i-xlsx_path">xlsx_path</a></li>

    </ul>
  </div>



  <footer id="validator-badges" role="contentinfo">
  <p><a href="https://validator.w3.org/check/referer">Validate</a></p>
  <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.15.1.</p>
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>
</footer>

</nav>

<main role="main" aria-labelledby="class-RubyXL::Workbook">
  
  
    <ol role="navigation" aria-label="Breadcrumb navigation" class="breadcrumb">
      
      <li>
        
        <a href="../RubyXL.html">RubyXL</a><span>::</span>
        
      </li>
      
      <li>
        
        <span>Workbook</span>
        
      </li>
      
    </ol>
  

  <h1 id="class-RubyXL::Workbook" class="anchor-link class">
    class RubyXL::Workbook
  </h1>

  <section class="description">
    
<p><a href="http://www.datypic.com/sc/ooxml/e-ssml_workbook.html">www.datypic.com/sc/ooxml/e-ssml_workbook.html</a></p>

  </section>


  <section id="5Buntitled-5D" class="documentation-section anchor-link">





    <section class="constants-list">
      <header>
        <h3>Constants</h3>
      </header>
      <dl>

        <dt id="APPLICATION">APPLICATION</dt>

        <dd>

          
        </dd>


        <dt id="APPVERSION">APPVERSION</dt>

        <dd>

          
        </dd>


        <dt id="CONTENT_TYPE">CONTENT_TYPE</dt>

        <dd>

          
        </dd>


        <dt id="CONTENT_TYPE_TEMPLATE">CONTENT_TYPE_TEMPLATE</dt>

        <dd>

          
        </dd>


        <dt id="CONTENT_TYPE_TEMPLATE_WITH_MACROS">CONTENT_TYPE_TEMPLATE_WITH_MACROS</dt>

        <dd>

          
        </dd>


        <dt id="CONTENT_TYPE_WITH_MACROS">CONTENT_TYPE_WITH_MACROS</dt>

        <dd>

          
        </dd>


        <dt id="DATE1899">DATE1899</dt>

        <dd>

          <p>Subtracting one day to accommodate for erroneous 1900 leap year compatibility only for 1900 based dates</p>
        </dd>


        <dt id="DATE1904">DATE1904</dt>

        <dd>

          
        </dd>


        <dt id="MARCH_1_1900">MARCH_1_1900</dt>

        <dd>

          
        </dd>


        <dt id="REL_TYPE">REL_TYPE</dt>

        <dd>

          
        </dd>


        <dt id="SHEET_NAME_FORBIDDEN_CHARS">SHEET_NAME_FORBIDDEN_CHARS</dt>

        <dd>

          <p><a href="http://www.accountingweb.com/technology/excel/seven-characters-you-cant-use-in-worksheet-names">www.accountingweb.com/technology/excel/seven-characters-you-cant-use-in-worksheet-names</a></p>
        </dd>


        <dt id="SHEET_NAME_FORBIDDEN_NAMES">SHEET_NAME_FORBIDDEN_NAMES</dt>

        <dd>

          <p><a href="https://answers.microsoft.com/en-us/msoffice/forum/all/excel-history-is-a-reserved-name-help/f8a398a4-b72c-48e3-82da-4f132c305e91">answers.microsoft.com/en-us/msoffice/forum/all/excel-history-is-a-reserved-name-help/f8a398a4-b72c-48e3-82da-4f132c305e91</a></p>
        </dd>


        <dt id="SHEET_NAME_TEMPLATE">SHEET_NAME_TEMPLATE</dt>

        <dd>

          
        </dd>


      </dl>
    </section>



    <section class="attribute-method-details method-section">
      <header>
        <h3>Attributes</h3>
      </header>


      <div id="attribute-i-is_template" class="method-detail anchor-link">
        <div class="method-heading attribute-method-heading">
          <a href="#attribute-i-is_template" title="Link to this attribute">
            <span class="method-name">is_template</span>
            <span class="attribute-access-type">[RW]</span>
          </a>
        </div>

        <div class="method-description">


        

        </div>
      </div>

      <div id="attribute-i-worksheets" class="method-detail anchor-link">
        <div class="method-heading attribute-method-heading">
          <a href="#attribute-i-worksheets" title="Link to this attribute">
            <span class="method-name">worksheets</span>
            <span class="attribute-access-type">[RW]</span>
          </a>
        </div>

        <div class="method-description">


        

        </div>
      </div>

    </section>



     <section id="public-class-5Buntitled-5D-method-details" class="method-section anchor-link">
       <header>
         <h3>Public Class Methods</h3>
       </header>


      <div id="method-c-new" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-c-new" title="Link to this method">
                <span class="method-name">new</span>
                <span class="method-args">(worksheets = [], src_file_path = nil, creator = nil, modifier = nil, created_at = nil, company = &#39;&#39;, application = APPLICATION, appversion = APPVERSION, date1904 = 0, is_template = false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 447</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">worksheets</span> = [], <span class="ruby-identifier">src_file_path</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">creator</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">modifier</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">created_at</span> = <span class="ruby-keyword">nil</span>,
               <span class="ruby-identifier">company</span> = <span class="ruby-string">&#39;&#39;</span>, <span class="ruby-identifier">application</span> = <span class="ruby-constant">APPLICATION</span>, <span class="ruby-identifier">appversion</span> = <span class="ruby-constant">APPVERSION</span>, <span class="ruby-identifier">date1904</span> = <span class="ruby-value">0</span>,
               <span class="ruby-identifier">is_template</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-keyword">super</span>()

  <span class="ruby-comment"># Order of sheets in the +worksheets+ array corresponds to the order of pages in Excel UI.</span>
  <span class="ruby-comment"># SheetId&#39;s, rId&#39;s, etc. are completely unrelated to ordering.</span>
  <span class="ruby-ivar">@worksheets</span> = <span class="ruby-identifier">worksheets</span>
  <span class="ruby-identifier">add_worksheet</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@worksheets</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-ivar">@theme</span>                    = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Theme</span>.<span class="ruby-identifier">default</span>
  <span class="ruby-ivar">@shared_strings_container</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">SharedStringsTable</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-ivar">@stylesheet</span>               = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Stylesheet</span>.<span class="ruby-identifier">default</span>
  <span class="ruby-ivar">@relationship_container</span>   = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">OOXMLRelationshipsFile</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-ivar">@root</span>                     = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkbookRoot</span>.<span class="ruby-identifier">default</span>
  <span class="ruby-ivar">@root</span>.<span class="ruby-identifier">workbook</span>            = <span class="ruby-keyword">self</span>
  <span class="ruby-ivar">@root</span>.<span class="ruby-identifier">source_file_path</span>    = <span class="ruby-identifier">src_file_path</span>

  <span class="ruby-identifier">creation_time</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">created_at</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">now</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">created_at</span>  = <span class="ruby-identifier">creation_time</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">modified_at</span> = <span class="ruby-identifier">creation_time</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">company</span>     = <span class="ruby-identifier">company</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">application</span> = <span class="ruby-identifier">application</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">appversion</span>  = <span class="ruby-identifier">appversion</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">creator</span>     = <span class="ruby-identifier">creator</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">modifier</span>    = <span class="ruby-identifier">modifier</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">date1904</span>    = <span class="ruby-identifier">date1904</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">is_template</span> = <span class="ruby-identifier">is_template</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


            <div class="method-calls-super">
              Calls superclass method
              <a href="OOXMLObjectInstanceMethods.html#method-c-new"><code>RubyXL::OOXMLObjectInstanceMethods::new</code></a>
            </div>

        </div>





      </div>


    </section>

     <section id="public-instance-5Buntitled-5D-method-details" class="method-section anchor-link">
       <header>
         <h3>Public Instance Methods</h3>
       </header>


      <div id="method-i-5B-5D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-5B-5D" title="Link to this method">
                <span class="method-name">[]</span>
                <span class="method-args">(ind)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="5B-5D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 480</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]</span>(<span class="ruby-identifier">ind</span>)
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">ind</span>
  <span class="ruby-keyword">when</span> <span class="ruby-constant">Integer</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">worksheets</span>[<span class="ruby-identifier">ind</span>]
  <span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>  <span class="ruby-keyword">then</span> <span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ws</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ws</span>.<span class="ruby-identifier">sheet_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">ind</span> }
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Finds worksheet by its name or numerical index</p>


        </div>





      </div>


      <div id="method-i-add_worksheet" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-add_worksheet" title="Link to this method">
                <span class="method-name">add_worksheet</span>
                <span class="method-args">(name = nil)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="add_worksheet-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 490</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_worksheet</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">n</span> = <span class="ruby-value">0</span>

    <span class="ruby-keyword">begin</span>
      <span class="ruby-identifier">name</span> = <span class="ruby-constant">SHEET_NAME_TEMPLATE</span> <span class="ruby-operator">%</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>)
    <span class="ruby-keyword">end</span> <span class="ruby-keyword">until</span> <span class="ruby-keyword">self</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">nil?</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">new_worksheet</span> = <span class="ruby-constant">Worksheet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:workbook</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">self</span>, <span class="ruby-value">:sheet_name</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">name</span>)
  <span class="ruby-identifier">worksheets</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">new_worksheet</span>
  <span class="ruby-identifier">new_worksheet</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Create new simple worksheet and add it to the workbook worksheets</p>

<p>@param [String] The name for the new worksheet</p>


        </div>





      </div>


      <div id="method-i-application" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-application" title="Link to this method">
                <span class="method-name">application</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="application-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 529</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">application</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span>&amp;.<span class="ruby-identifier">value</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-application-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-application-3D" title="Link to this method">
                <span class="method-name">application=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="application-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 533</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">application=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-appversion" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-appversion" title="Link to this method">
                <span class="method-name">appversion</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="appversion-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 538</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">appversion</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span>&amp;.<span class="ruby-identifier">value</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-appversion-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-appversion-3D" title="Link to this method">
                <span class="method-name">appversion=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="appversion-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 542</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">appversion=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-before_write_xml" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-before_write_xml" title="Link to this method">
                <span class="method-name">before_write_xml</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="before_write_xml-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 369</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">before_write_xml</span>
  <span class="ruby-identifier">max_sheet_id</span> = <span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">collect</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:sheet_id</span>).<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">max</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>

  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">sheets</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Sheets</span>.<span class="ruby-identifier">new</span>

  <span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">sheet</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">rel</span> = <span class="ruby-identifier">relationship_container</span>.<span class="ruby-identifier">find_by_target</span>(<span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">xlsx_path</span>)

    <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Worksheet name &#39;#{sheet.sheet_name}&#39; contains forbidden characters&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_name</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">SHEET_NAME_FORBIDDEN_CHARS</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Worksheet name &#39;#{sheet.sheet_name}&#39; is forbidden&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">SHEET_NAME_FORBIDDEN_NAMES</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_name</span>)

    <span class="ruby-identifier">sheets</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Sheet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:name</span>     <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_name</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">30</span>], <span class="ruby-comment"># Max sheet name length is 31 char</span>
                                <span class="ruby-value">:sheet_id</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_id</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">max_sheet_id</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>),
                                <span class="ruby-value">:state</span>    <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">state</span>,
                                <span class="ruby-value">:r_id</span>     <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">rel</span>.<span class="ruby-identifier">id</span>)
  }

  <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-company" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-company" title="Link to this method">
                <span class="method-name">company</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="company-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 520</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">company</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span>&amp;.<span class="ruby-identifier">value</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-company-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-company-3D" title="Link to this method">
                <span class="method-name">company=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="company-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 524</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">company=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-content_type" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-content_type" title="Link to this method">
                <span class="method-name">content_type</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="content_type-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 313</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">content_type</span>
  <span class="ruby-identifier">content_type_name</span> = <span class="ruby-string">&#39;CONTENT_TYPE&#39;</span>
  <span class="ruby-identifier">content_type_name</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;_TEMPLATE&#39;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">is_template</span>
  <span class="ruby-identifier">content_type_name</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&#39;_WITH_MACROS&#39;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">macros</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">content_type_name</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-created_at" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-created_at" title="Link to this method">
                <span class="method-name">created_at</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="created_at-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 504</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">created_at</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-created_at-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-created_at-3D" title="Link to this method">
                <span class="method-name">created_at=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="created_at-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 508</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">created_at=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-creator" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-creator" title="Link to this method">
                <span class="method-name">creator</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="creator-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 547</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">creator</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-creator-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-creator-3D" title="Link to this method">
                <span class="method-name">creator=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="creator-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 551</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">creator=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-date1904" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-date1904" title="Link to this method">
                <span class="method-name">date1904</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="date1904-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 563</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">date1904</span>
  <span class="ruby-identifier">workbook_properties</span>&amp;.<span class="ruby-identifier">date1904</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-date1904-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-date1904-3D" title="Link to this method">
                <span class="method-name">date1904=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="date1904-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 567</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">date1904=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">workbook_properties</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkbookProperties</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-identifier">workbook_properties</span>.<span class="ruby-identifier">date1904</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-date_to_num" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-date_to_num" title="Link to this method">
                <span class="method-name">date_to_num</span>
                <span class="method-args">(date)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="date_to_num-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 423</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">date_to_num</span>(<span class="ruby-identifier">date</span>)
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">date</span>
  <span class="ruby-keyword">when</span> <span class="ruby-constant">Date</span>, <span class="ruby-constant">DateTime</span> <span class="ruby-keyword">then</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">ajd</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">base_date</span>.<span class="ruby-identifier">ajd</span>).<span class="ruby-identifier">to_f</span>
  <span class="ruby-keyword">when</span> <span class="ruby-constant">Time</span> <span class="ruby-keyword">then</span> ((<span class="ruby-identifier">date</span>.<span class="ruby-identifier">to_r</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">base_date</span>.<span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">to_r</span>) <span class="ruby-operator">/</span> <span class="ruby-value">86400</span>).<span class="ruby-identifier">to_f</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-modified_at" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-modified_at" title="Link to this method">
                <span class="method-name">modified_at</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="modified_at-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 512</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modified_at</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modified_at</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-modified_at-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-modified_at-3D" title="Link to this method">
                <span class="method-name">modified_at=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="modified_at-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 516</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modified_at=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modified_at</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-modifier" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-modifier" title="Link to this method">
                <span class="method-name">modifier</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="modifier-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 555</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modifier</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-modifier-3D" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-modifier-3D" title="Link to this method">
                <span class="method-name">modifier=</span>
                <span class="method-args">(v)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="modifier-3D-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 559</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modifier=</span>(<span class="ruby-identifier">v</span>)
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span> = <span class="ruby-identifier">v</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-num_to_date" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-num_to_date" title="Link to this method">
                <span class="method-name">num_to_date</span>
                <span class="method-args">(num)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="num_to_date-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 430</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">num_to_date</span>(<span class="ruby-identifier">num</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">num</span>.<span class="ruby-identifier">nil?</span>

  <span class="ruby-comment"># Bug-for-bug Excel compatibility (https://support.microsoft.com/kb/214058/)</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">num</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">MARCH_1_1900</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">num</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">workbook_properties</span>&amp;.<span class="ruby-identifier">date1904</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">dateparts</span> = <span class="ruby-identifier">num</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-value">1</span>)
  <span class="ruby-identifier">base_date</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">dateparts</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+</span> ((<span class="ruby-identifier">dateparts</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">*</span> <span class="ruby-value">86400</span>).<span class="ruby-identifier">round</span>(<span class="ruby-value">6</span>) <span class="ruby-operator">/</span> <span class="ruby-value">86400</span>))
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-related_objects" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-related_objects" title="Link to this method">
                <span class="method-name">related_objects</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="related_objects-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 320</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">related_objects</span>
  [ <span class="ruby-identifier">calculation_chain</span>, <span class="ruby-identifier">stylesheet</span>, <span class="ruby-identifier">theme</span>, <span class="ruby-identifier">shared_strings_container</span>, <span class="ruby-identifier">macros</span> ] <span class="ruby-operator">+</span> <span class="ruby-ivar">@worksheets</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-save" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-save" title="Link to this method">
                <span class="method-name">save</span>
                <span class="method-args">(dst_file_path = nil)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="save-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 399</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">save</span>(<span class="ruby-identifier">dst_file_path</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">dst_file_path</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">source_file_path</span>

  <span class="ruby-identifier">extension</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">dst_file_path</span>)
  <span class="ruby-keyword">unless</span> <span class="ruby-node">%w{.xlsx .xlsm .xltx .xltm}</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">extension</span>.<span class="ruby-identifier">downcase</span>)
    <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unsupported extension: #{extension} (only .xlsx, .xlsm, .xltx and .xltm files are supported).&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dst_file_path</span>, <span class="ruby-string">&#39;wb&#39;</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">output_file</span><span class="ruby-operator">|</span> <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_stream</span>(<span class="ruby-identifier">root</span>.<span class="ruby-identifier">stream</span>, <span class="ruby-identifier">output_file</span>) }

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">dst_file_path</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Save the resulting XLSX file to the specified location</p>


        </div>



        <div class="aliases">
          Also aliased as: <a href="Workbook.html#method-i-write">write</a>
        </div>



      </div>


      <div id="method-i-stream" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-stream" title="Link to this method">
                <span class="method-name">stream</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="stream-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 394</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">stream</span>
  <span class="ruby-identifier">root</span>.<span class="ruby-identifier">stream</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Return the resulting XLSX file in a stream (useful for sending over HTTP)</p>


        </div>





      </div>


      <div id="method-i-write" class="method-detail anchor-link method-alias">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-write" title="Link to this method">
                <span class="method-name">write</span>
                <span class="method-args">(dst_file_path = nil)</span>
              </a>
            </div>

        </div>




        <div class="method-description">



          


        </div>





        <div class="aliases">
          Alias for: <a href="Workbook.html#method-i-save">save</a>
        </div>

      </div>


      <div id="method-i-xlsx_path" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-xlsx_path" title="Link to this method">
                <span class="method-name">xlsx_path</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="xlsx_path-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 389</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">xlsx_path</span>
  <span class="ruby-constant">ROOT</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;xl&#39;</span>, <span class="ruby-string">&#39;workbook.xml&#39;</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


    </section>

  </section>

</main>
</body>

